package com.serv.common.route;

import com.jfinal.config.Routes;
import com.serv.admin.AdminController;
import com.serv.admin.SidebarController;
import com.serv.admin.sys.DataControlController;
import com.serv.admin.sys.PermissionController;
import com.serv.admin.sys.RoleController;
import com.serv.employee.EmployeeController;
import com.serv.merchant.MerchantController;

/**
 * 后端路由
 */
public class AdminRoutes extends Routes {

	@Override
	public void config() {
		setBaseViewPath("/WEB-INF/view");
		
		addInterceptor(new AdminAuthInterceptor());
	    add("/", AdminController.class);
	    add("/sidebar", SidebarController.class);
	    
	    add("/role", RoleController.class);
	    add("/permission", PermissionController.class);
	    add("/data_control", DataControlController.class);
	    
	    add("/merchant",MerchantController.class);
	    add("/employee",EmployeeController.class);
	}
}
